package org.admanager.mapping.plugin.diagram.providers;

import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Set;

import org.admanager.mapping.plugin.diagram.edit.parts.ComponentEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentReferenceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentReferenceMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentReferenceMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentReferenceMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentServiceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentServiceMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentServiceMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ComponentServiceMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.CompositeEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.CompositeMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.CompositeMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.CompositeMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.DocumentRootEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponent2EditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponentEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponentReference2EditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponentReferenceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponentService2EditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PComponentServiceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PCompositeEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PReferenceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PServiceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.PatternEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ReferenceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ReferenceMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ReferenceMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ReferenceMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.RootMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ServiceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ServiceMappingEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ServiceMappingSourceEditPart;
import org.admanager.mapping.plugin.diagram.edit.parts.ServiceMappingTargetEditPart;
import org.admanager.mapping.plugin.diagram.part.SOADManagementMetamodelDiagramEditorPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;

/**
 * @generated
 */
public class SOADManagementMetamodelElementTypes {

	/**
	 * @generated
	 */
	private SOADManagementMetamodelElementTypes() {
	}

	/**
	 * @generated
	 */
	private static Map/*[org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.emf.ecore.ENamedElement]*/elements;

	/**
	 * @generated
	 */
	private static ImageRegistry imageRegistry;

	/**
	 * @generated
	 */
	private static Set/*[org.eclipse.gmf.runtime.emf.type.core.IElementType]*/KNOWN_ELEMENT_TYPES;

	/**
	 * @generated
	 */
	public static final IElementType RootMapping_1000 = getElementType("org.admanager.mapping.plugin.diagram.RootMapping_1000"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMapping_2010 = getElementType("org.admanager.mapping.plugin.diagram.ComponentReferenceMapping_2010"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMapping_2011 = getElementType("org.admanager.mapping.plugin.diagram.ComponentServiceMapping_2011"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMapping_2012 = getElementType("org.admanager.mapping.plugin.diagram.CompositeMapping_2012"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMapping_2013 = getElementType("org.admanager.mapping.plugin.diagram.ComponentMapping_2013"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMapping_2014 = getElementType("org.admanager.mapping.plugin.diagram.ServiceMapping_2014"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMapping_2015 = getElementType("org.admanager.mapping.plugin.diagram.ReferenceMapping_2015"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType DocumentRoot_2016 = getElementType("org.admanager.mapping.plugin.diagram.DocumentRoot_2016"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Pattern_2017 = getElementType("org.admanager.mapping.plugin.diagram.Pattern_2017"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Composite_3016 = getElementType("org.admanager.mapping.plugin.diagram.Composite_3016"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Component_3011 = getElementType("org.admanager.mapping.plugin.diagram.Component_3011"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReference_3009 = getElementType("org.admanager.mapping.plugin.diagram.ComponentReference_3009"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentService_3008 = getElementType("org.admanager.mapping.plugin.diagram.ComponentService_3008"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Service_3014 = getElementType("org.admanager.mapping.plugin.diagram.Service_3014"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType Reference_3015 = getElementType("org.admanager.mapping.plugin.diagram.Reference_3015"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponent_3017 = getElementType("org.admanager.mapping.plugin.diagram.PComponent_3017"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponentService_3018 = getElementType("org.admanager.mapping.plugin.diagram.PComponentService_3018"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponentReference_3019 = getElementType("org.admanager.mapping.plugin.diagram.PComponentReference_3019"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComposite_3020 = getElementType("org.admanager.mapping.plugin.diagram.PComposite_3020"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponent_3021 = getElementType("org.admanager.mapping.plugin.diagram.PComponent_3021"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponentService_3022 = getElementType("org.admanager.mapping.plugin.diagram.PComponentService_3022"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PComponentReference_3023 = getElementType("org.admanager.mapping.plugin.diagram.PComponentReference_3023"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PService_3024 = getElementType("org.admanager.mapping.plugin.diagram.PService_3024"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType PReference_3025 = getElementType("org.admanager.mapping.plugin.diagram.PReference_3025"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMappingTarget_4013 = getElementType("org.admanager.mapping.plugin.diagram.CompositeMappingTarget_4013"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMappingSource_4014 = getElementType("org.admanager.mapping.plugin.diagram.ServiceMappingSource_4014"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ServiceMappingTarget_4015 = getElementType("org.admanager.mapping.plugin.diagram.ServiceMappingTarget_4015"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMappingTarget_4016 = getElementType("org.admanager.mapping.plugin.diagram.ReferenceMappingTarget_4016"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ReferenceMappingSource_4017 = getElementType("org.admanager.mapping.plugin.diagram.ReferenceMappingSource_4017"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMappingTarget_4018 = getElementType("org.admanager.mapping.plugin.diagram.ComponentMappingTarget_4018"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentMappingSource_4019 = getElementType("org.admanager.mapping.plugin.diagram.ComponentMappingSource_4019"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMappingSource_4020 = getElementType("org.admanager.mapping.plugin.diagram.ComponentServiceMappingSource_4020"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMappingTarget_4021 = getElementType("org.admanager.mapping.plugin.diagram.ComponentReferenceMappingTarget_4021"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentReferenceMappingSource_4022 = getElementType("org.admanager.mapping.plugin.diagram.ComponentReferenceMappingSource_4022"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType CompositeMappingSource_4023 = getElementType("org.admanager.mapping.plugin.diagram.CompositeMappingSource_4023"); //$NON-NLS-1$
	/**
	 * @generated
	 */
	public static final IElementType ComponentServiceMappingTarget_4024 = getElementType("org.admanager.mapping.plugin.diagram.ComponentServiceMappingTarget_4024"); //$NON-NLS-1$

	/**
	 * @generated
	 */
	private static ImageRegistry getImageRegistry() {
		if (imageRegistry == null) {
			imageRegistry = new ImageRegistry();
		}
		return imageRegistry;
	}

	/**
	 * @generated
	 */
	private static String getImageRegistryKey(ENamedElement element) {
		return element.getName();
	}

	/**
	 * @generated
	 */
	private static ImageDescriptor getProvidedImageDescriptor(
			ENamedElement element) {
		if (element instanceof EStructuralFeature) {
			EStructuralFeature feature = ((EStructuralFeature) element);
			EClass eContainingClass = feature.getEContainingClass();
			EClassifier eType = feature.getEType();
			if (eContainingClass != null && !eContainingClass.isAbstract()) {
				element = eContainingClass;
			} else if (eType instanceof EClass
					&& !((EClass) eType).isAbstract()) {
				element = eType;
			}
		}
		if (element instanceof EClass) {
			EClass eClass = (EClass) element;
			if (!eClass.isAbstract()) {
				return SOADManagementMetamodelDiagramEditorPlugin.getInstance()
						.getItemImageDescriptor(
								eClass.getEPackage().getEFactoryInstance()
										.create(eClass));
			}
		}
		// TODO : support structural features
		return null;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(ENamedElement element) {
		String key = getImageRegistryKey(element);
		ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
		if (imageDescriptor == null) {
			imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
		}
		return imageDescriptor;
	}

	/**
	 * @generated
	 */
	public static Image getImage(ENamedElement element) {
		String key = getImageRegistryKey(element);
		Image image = getImageRegistry().get(key);
		if (image == null) {
			ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
			if (imageDescriptor == null) {
				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
			}
			getImageRegistry().put(key, imageDescriptor);
			image = getImageRegistry().get(key);
		}
		return image;
	}

	/**
	 * @generated
	 */
	public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImageDescriptor(element);
	}

	/**
	 * @generated
	 */
	public static Image getImage(IAdaptable hint) {
		ENamedElement element = getElement(hint);
		if (element == null) {
			return null;
		}
		return getImage(element);
	}

	/**
	 * Returns 'type' of the ecore object associated with the hint.
	 * 
	 * @generated
	 */
	public static ENamedElement getElement(IAdaptable hint) {
		Object type = hint.getAdapter(IElementType.class);
		if (elements == null) {
			elements = new IdentityHashMap/*[org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.emf.ecore.ENamedElement]*/();

			elements.put(
					RootMapping_1000,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getRootMapping());

			elements.put(
					ComponentReferenceMapping_2010,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentReferenceMapping());

			elements.put(
					ComponentServiceMapping_2011,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentServiceMapping());

			elements.put(
					CompositeMapping_2012,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getCompositeMapping());

			elements.put(
					ComponentMapping_2013,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentMapping());

			elements.put(
					ServiceMapping_2014,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getServiceMapping());

			elements.put(
					ReferenceMapping_2015,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getReferenceMapping());

			elements.put(
					DocumentRoot_2016,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getDocumentRoot());

			elements.put(
					Pattern_2017,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPattern());

			elements.put(
					Composite_3016,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComposite());

			elements.put(
					Component_3011,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponent());

			elements.put(
					ComponentReference_3009,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentReference());

			elements.put(
					ComponentService_3008,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentService());

			elements.put(
					Service_3014,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getService());

			elements.put(
					Reference_3015,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getReference());

			elements.put(
					PComponent_3017,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponent());

			elements.put(
					PComponentService_3018,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponentService());

			elements.put(
					PComponentReference_3019,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponentReference());

			elements.put(
					PComposite_3020,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComposite());

			elements.put(
					PComponent_3021,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponent());

			elements.put(
					PComponentService_3022,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponentService());

			elements.put(
					PComponentReference_3023,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPComponentReference());

			elements.put(
					PService_3024,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPService());

			elements.put(
					PReference_3025,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getPReference());

			elements.put(
					CompositeMappingTarget_4013,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getCompositeMapping_Target());

			elements.put(
					ServiceMappingSource_4014,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getServiceMapping_Source());

			elements.put(
					ServiceMappingTarget_4015,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getServiceMapping_Target());

			elements.put(
					ReferenceMappingTarget_4016,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getReferenceMapping_Target());

			elements.put(
					ReferenceMappingSource_4017,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getReferenceMapping_Source());

			elements.put(
					ComponentMappingTarget_4018,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentMapping_Target());

			elements.put(
					ComponentMappingSource_4019,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentMapping_Source());

			elements.put(
					ComponentServiceMappingSource_4020,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentServiceMapping_Source());

			elements.put(
					ComponentReferenceMappingTarget_4021,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentReferenceMapping_Target());

			elements.put(
					ComponentReferenceMappingSource_4022,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentReferenceMapping_Source());

			elements.put(
					CompositeMappingSource_4023,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getCompositeMapping_Source());

			elements.put(
					ComponentServiceMappingTarget_4024,
					org.admanager.soadmanagement.plugin.soadmanagement.soadmanagementPackage.eINSTANCE
							.getComponentServiceMapping_Target());
		}
		return (ENamedElement) elements.get(type);
	}

	/**
	 * @generated
	 */
	private static IElementType getElementType(String id) {
		return ElementTypeRegistry.getInstance().getType(id);
	}

	/**
	 * @generated
	 */
	public static boolean isKnownElementType(IElementType elementType) {
		if (KNOWN_ELEMENT_TYPES == null) {
			KNOWN_ELEMENT_TYPES = new HashSet/*[org.eclipse.gmf.runtime.emf.type.core.IElementType]*/();
			KNOWN_ELEMENT_TYPES.add(RootMapping_1000);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMapping_2010);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMapping_2011);
			KNOWN_ELEMENT_TYPES.add(CompositeMapping_2012);
			KNOWN_ELEMENT_TYPES.add(ComponentMapping_2013);
			KNOWN_ELEMENT_TYPES.add(ServiceMapping_2014);
			KNOWN_ELEMENT_TYPES.add(ReferenceMapping_2015);
			KNOWN_ELEMENT_TYPES.add(DocumentRoot_2016);
			KNOWN_ELEMENT_TYPES.add(Pattern_2017);
			KNOWN_ELEMENT_TYPES.add(Composite_3016);
			KNOWN_ELEMENT_TYPES.add(Component_3011);
			KNOWN_ELEMENT_TYPES.add(ComponentReference_3009);
			KNOWN_ELEMENT_TYPES.add(ComponentService_3008);
			KNOWN_ELEMENT_TYPES.add(Service_3014);
			KNOWN_ELEMENT_TYPES.add(Reference_3015);
			KNOWN_ELEMENT_TYPES.add(PComponent_3017);
			KNOWN_ELEMENT_TYPES.add(PComponentService_3018);
			KNOWN_ELEMENT_TYPES.add(PComponentReference_3019);
			KNOWN_ELEMENT_TYPES.add(PComposite_3020);
			KNOWN_ELEMENT_TYPES.add(PComponent_3021);
			KNOWN_ELEMENT_TYPES.add(PComponentService_3022);
			KNOWN_ELEMENT_TYPES.add(PComponentReference_3023);
			KNOWN_ELEMENT_TYPES.add(PService_3024);
			KNOWN_ELEMENT_TYPES.add(PReference_3025);
			KNOWN_ELEMENT_TYPES.add(CompositeMappingTarget_4013);
			KNOWN_ELEMENT_TYPES.add(ServiceMappingSource_4014);
			KNOWN_ELEMENT_TYPES.add(ServiceMappingTarget_4015);
			KNOWN_ELEMENT_TYPES.add(ReferenceMappingTarget_4016);
			KNOWN_ELEMENT_TYPES.add(ReferenceMappingSource_4017);
			KNOWN_ELEMENT_TYPES.add(ComponentMappingTarget_4018);
			KNOWN_ELEMENT_TYPES.add(ComponentMappingSource_4019);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMappingSource_4020);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMappingTarget_4021);
			KNOWN_ELEMENT_TYPES.add(ComponentReferenceMappingSource_4022);
			KNOWN_ELEMENT_TYPES.add(CompositeMappingSource_4023);
			KNOWN_ELEMENT_TYPES.add(ComponentServiceMappingTarget_4024);
		}
		return KNOWN_ELEMENT_TYPES.contains(elementType);
	}

	/**
	 * @generated
	 */
	public static IElementType getElementType(int visualID) {
		switch (visualID) {
		case RootMappingEditPart.VISUAL_ID:
			return RootMapping_1000;
		case ComponentReferenceMappingEditPart.VISUAL_ID:
			return ComponentReferenceMapping_2010;
		case ComponentServiceMappingEditPart.VISUAL_ID:
			return ComponentServiceMapping_2011;
		case CompositeMappingEditPart.VISUAL_ID:
			return CompositeMapping_2012;
		case ComponentMappingEditPart.VISUAL_ID:
			return ComponentMapping_2013;
		case ServiceMappingEditPart.VISUAL_ID:
			return ServiceMapping_2014;
		case ReferenceMappingEditPart.VISUAL_ID:
			return ReferenceMapping_2015;
		case DocumentRootEditPart.VISUAL_ID:
			return DocumentRoot_2016;
		case PatternEditPart.VISUAL_ID:
			return Pattern_2017;
		case CompositeEditPart.VISUAL_ID:
			return Composite_3016;
		case ComponentEditPart.VISUAL_ID:
			return Component_3011;
		case ComponentReferenceEditPart.VISUAL_ID:
			return ComponentReference_3009;
		case ComponentServiceEditPart.VISUAL_ID:
			return ComponentService_3008;
		case ServiceEditPart.VISUAL_ID:
			return Service_3014;
		case ReferenceEditPart.VISUAL_ID:
			return Reference_3015;
		case PComponentEditPart.VISUAL_ID:
			return PComponent_3017;
		case PComponentServiceEditPart.VISUAL_ID:
			return PComponentService_3018;
		case PComponentReferenceEditPart.VISUAL_ID:
			return PComponentReference_3019;
		case PCompositeEditPart.VISUAL_ID:
			return PComposite_3020;
		case PComponent2EditPart.VISUAL_ID:
			return PComponent_3021;
		case PComponentService2EditPart.VISUAL_ID:
			return PComponentService_3022;
		case PComponentReference2EditPart.VISUAL_ID:
			return PComponentReference_3023;
		case PServiceEditPart.VISUAL_ID:
			return PService_3024;
		case PReferenceEditPart.VISUAL_ID:
			return PReference_3025;
		case CompositeMappingTargetEditPart.VISUAL_ID:
			return CompositeMappingTarget_4013;
		case ServiceMappingSourceEditPart.VISUAL_ID:
			return ServiceMappingSource_4014;
		case ServiceMappingTargetEditPart.VISUAL_ID:
			return ServiceMappingTarget_4015;
		case ReferenceMappingTargetEditPart.VISUAL_ID:
			return ReferenceMappingTarget_4016;
		case ReferenceMappingSourceEditPart.VISUAL_ID:
			return ReferenceMappingSource_4017;
		case ComponentMappingTargetEditPart.VISUAL_ID:
			return ComponentMappingTarget_4018;
		case ComponentMappingSourceEditPart.VISUAL_ID:
			return ComponentMappingSource_4019;
		case ComponentServiceMappingSourceEditPart.VISUAL_ID:
			return ComponentServiceMappingSource_4020;
		case ComponentReferenceMappingTargetEditPart.VISUAL_ID:
			return ComponentReferenceMappingTarget_4021;
		case ComponentReferenceMappingSourceEditPart.VISUAL_ID:
			return ComponentReferenceMappingSource_4022;
		case CompositeMappingSourceEditPart.VISUAL_ID:
			return CompositeMappingSource_4023;
		case ComponentServiceMappingTargetEditPart.VISUAL_ID:
			return ComponentServiceMappingTarget_4024;
		}
		return null;
	}

}
